import React, { Component } from 'react';
// import AntdTest from './components/AntdTest/AntdTest.js'
// import AntdTest from './components/AntdTest/Hoc.js'
import AntdTest from './components/AntdTest/Composition.js'
class App extends Component {
  constructor(prop){
    super(prop)
    this.state = {
      title: '来自父组件'
    }
  }
  render() {
    return (
      <div>
        <AntdTest add={this.handleAdd} title={this.state.title}></AntdTest>
      </div>
    );
  }
  handleAdd = ()=>{
    console.log(this)
    console.log('调用父组件的方法')
    this.setState({
      title: '父组件修改了button'
    })
  }
}

export default App;
